﻿using System;
using System.Web.UI;
using System.Web.UI.HtmlControls;

namespace TracNghiemChonTruong
{
    public partial class JobPage : System.Web.UI.Page
    {
        private string Id
        {
            get { return Request["Id"] ?? "1"; }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                HtmlGenericControl header = null;
                HtmlGenericControl paragraph = null;
                switch (Id)
                {
                    case "R":
                        header = h1;
                        paragraph = p1;
                        break;
                    case "I":
                        header = h2;
                        paragraph = p2;
                        break;
                    case "A":
                        header = h3;
                        paragraph = p3;
                        break;
                    case "S":
                        header = h4;
                        paragraph = p4;
                        break;
                    case "E":
                        header = h5;
                        paragraph = p5;
                        break;
                    case "C":
                        header = h6;
                        paragraph = p6;
                        break;
                }
                if (header != null)
                {
                    header.Style.Add(HtmlTextWriterStyle.FontWeight, "Bold");
                    header.Style.Add(HtmlTextWriterStyle.Color, "Blue");
                }

                if (paragraph != null)
                {
                    paragraph.Style.Add(HtmlTextWriterStyle.FontWeight, "Bold");
                    paragraph.Style.Add(HtmlTextWriterStyle.Color, "DarkBlue");
                }
            }
        }
    }
}